from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options

url=r'http://192.168.126.131/upload/'
driver=webdriver.Chrome(options=options)
driver.get(url)
driver.maximize_window()
sleep(3)
#注册
driver.find_element(By.LINK_TEXT,'立即注册').click()
sleep(3)
#注册用户名
driver.find_element(By.XPATH,'//*[@id="Zn2io6"]').clear()
driver.find_element(By.XPATH,'//*[@id="Zn2io6"]').send_keys('test001')
sleep(2)
#输入密码
driver.find_element(By.XPATH,'//*[@id="ckRN4W"]').clear()
driver.find_element(By.XPATH,'//*[@id="ckRN4W"]').send_keys('123456')
sleep(2)
#确认密码
driver.find_element(By.XPATH,'//*[@id="jKvX92"]').clear()
driver.find_element(By.XPATH,'//*[@id="jKvX92"]').send_keys('123456')
sleep(2)
#输入email
driver.find_element(By.XPATH,'//*[@id="s6uuMS"]').clear()
driver.find_element(By.XPATH,'//*[@id="s6uuMS"]').send_keys('1234@qq.com')
#提交
driver.find_element(By.XPATH,'//*[@id="registerformsubmit"]').click()
sleep(4)
#退出登录
driver.find_element(By.LINK_TEXT,'退出').click()
sleep(2)
